package com.app.xinfadi.ui.purchase_plan.view;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.app.xinfadi.R;
import com.app.xinfadi.dao_bean.bean.PurchasePlanBean;
import com.nostra13.universalimageloader.core.DisplayImageOptions;

import java.util.ArrayList;
import java.util.List;

public class ProducingAreaPriceListAdapter extends BaseAdapter {
    private Context context;
    private List<PurchasePlanBean> data;
    public DisplayImageOptions options;
    private ArrayList<String> imageUrl;
    public String TAG = "PatientsRingsDetailsAdapter";

    public ProducingAreaPriceListAdapter(Context context) {
        this.context = context;
        data = new ArrayList<PurchasePlanBean>();
    }

    @Override
    public int getCount() {
        return data.size();
    }

    @Override
    public Object getItem(int position) {
        return data.get(position);
    }

    @Override
    public long getItemId(int id) {
        return id;
    }


    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder = null;
        // 正常列表
        if (convertView == null) {
            convertView = LayoutInflater.from(context).inflate(R.layout.producing_area_price_list_item_layout, null);
            holder = new ViewHolder();
//            holder.patients_rings_nomal_Ll = (LinearLayout) convertView.findViewById(R.id.patients_rings_nomal_Ll);
            convertView.setTag(holder);
        } else {
            holder = (ViewHolder) convertView.getTag();
        }
        return convertView;
    }

    class ViewHolder {
        LinearLayout patients_rings_nomal_Ll;
        TextView patients_rings_nomal_usr_name;
        ImageView patients_rings_nomal_usr_img;
        TextView patients_rings_nomal_time;
        TextView patients_rings_nomal_title;
    }

    public List<PurchasePlanBean> getData() {
        return data;
    }

    public void setData(List<PurchasePlanBean> data) {
        this.data = data;
    }

}
